<?php
require_once("vcl/vcl.inc.php");
//Includes
use_unit("components4phpfull/jtjavascript.inc.php");
use_unit("components4phpfull/jtiframe.inc.php");
use_unit("components4phpfull/jtsitetheme.inc.php");
use_unit("forms.inc.php");
use_unit("extctrls.inc.php");
use_unit("stdctrls.inc.php");

//Class definition
class cemex extends Page
{
       public $imgBg2 = null;
       public $imgHaulers = null;
       public $imgVehicles = null;
       public $imgJtech = null;
       public $imgPower = null;
       public $flag = null;
       public $JTJavaScript1 = null;
       public $imgBraceRight = null;
       public $imgReport = null;
       public $imgQueue = null;
       public $imgStatus = null;
       public $imgBraceLeft = null;
       public $imgCustomers = null;
       public $imgPersonnel = null;
       public $imgBg = null;
       public $imgJTLogo = null;
       public $imgPoweredBy = null;
       public $lblUser = null;
       public $Label5 = null;
       public $lblDate = null;
       public $Label4 = null;
       public $imgBar = null;
       public $JTFrameMain = null;
       public $imgFooter = null;
       public $imgLogout = null;
       public $imgSettings = null;
       public $imgCemexLogo = null;
       public $imgPageBackground = null;
       public $JTSiteTheme1 = null;
       function imgHaulersJSClick($sender, $params)
       {

       ?>
       //Add your javascript code here
       removeSub();
       document.getElementById('flag').value = 'imgSettings';
       document.images['imgSettings'].src="image/settings3.png"
       clear('imgSettings');
       document.getElementById('JTFrameMain').src = 'hauler_list.php';
       <?php

       }

       function imgHaulersJSMouseOut($sender, $params)
       {

       ?>
       //Add your javascript code here
       document.images['imgHaulers'].src="image/btn_haulers.png"
       <?php

       }

       function imgHaulersJSMouseOver($sender, $params)
       {

       ?>
       //Add your javascript code here
       document.images['imgHaulers'].src="image/btn_haulers2.png"
       <?php

       }

       function imgVehiclesJSClick($sender, $params)
       {

       ?>
       //Add your javascript code here
       removeSub();
       document.getElementById('flag').value = 'imgSettings';
       document.images['imgSettings'].src="image/settings3.png"
       clear('imgSettings');
       document.getElementById('JTFrameMain').src = 'vehicle_list.php';
       <?php

       }

       function imgVehiclesJSMouseOut($sender, $params)
       {

       ?>
       //Add your javascript code here
       document.images['imgVehicles'].src="image/btn_vehicles.png"
       <?php

       }

       function imgVehiclesJSMouseOver($sender, $params)
       {

       ?>
       //Add your javascript code here
       document.images['imgVehicles'].src="image/btn_vehicles2.png"
       <?php

       }

       function cemexCreate($sender, $params)
       {
       $this->lblUser->Caption = $_SESSION['username'];
       $this->lblDate->Caption = date("Y/m/d") . "<br />";

       $this->JTFrameMain->setURL('main_status.php');

       }

       function imgCustomersJSClick($sender, $params)
       {

       ?>
       //Add your javascript code here
       removeSub();
       document.getElementById('flag').value = 'imgSettings';
       document.images['imgSettings'].src="image/settings3.png"
       clear('imgSettings');
       document.getElementById('JTFrameMain').src = 'vendor_list.php';
       <?php

       }

       function imgCustomersJSMouseOut($sender, $params)
       {

       ?>
       //Add your javascript code here
       document.images['imgCustomers'].src="image/btn_customers.png"
       <?php

       }

       function imgCustomersJSMouseOver($sender, $params)
       {

       ?>
       //Add your javascript code here
       document.images['imgCustomers'].src="image/btn_customers2.png"
       <?php

       }

       function imgPersonnelJSClick($sender, $params)
       {

       ?>
       //Add your javascript code here
       removeSub();
       document.getElementById('flag').value = 'imgSettings';
       document.images['imgSettings'].src="image/settings3.png"
       clear('imgSettings');
       document.getElementById('JTFrameMain').src = 'personnel_list.php';
       <?php

       }

       function imgPersonnelJSMouseOut($sender, $params)
       {

       ?>
       //Add your javascript code here
       document.images['imgPersonnel'].src="image/btn_personnel.png"
       <?php

       }

       function imgPersonnelJSMouseOver($sender, $params)
       {

       ?>
       //Add your javascript code here
       document.images['imgPersonnel'].src="image/btn_personnel2.png"
       <?php

       }

       function imgSettingsJSMouseOut($sender, $params)
       {

       ?>
       //Add your javascript code here
       if(document.getElementById('flag').value != 'imgSettings')
       {
       document.images['imgSettings'].src="image/settings1.png"
       }
       <?php

       }

       function imgSettingsJSMouseOver($sender, $params)
       {

       ?>
       //Add your javascript code here
       removeSub();
       if(document.getElementById('flag').value != 'imgSettings')
       {
       document.images['imgSettings'].src="image/settings2.png"
       }
       else
       {
       document.images['imgSettings'].src="image/settings3.png"
       }
       <?php

       }

       function imgLogoutJSMouseOut($sender, $params)
       {

       ?>
       //Add your javascript code here
        removeSub();
       document.images['imgLogout'].src="image/logout.png"
       <?php

       }

       function imgLogoutJSMouseOver($sender, $params)
       {

       ?>
       //Add your javascript code here
       removeSub();
       document.images['imgLogout'].src="image/logout2.png"
       <?php

       }

       function imgReportJSClick($sender, $params)
       {

       ?>
       //Add your javascript code here
       document.getElementById('flag').value = 'imgReport';
       document.images['imgReport'].src="image/report3.png"
       clear('imgReport');
       //document.getElementById('JTFrameMain').src = 'vehicle_list.php';
       <?php

       }

       function imgReportJSMouseOut($sender, $params)
       {

       ?>
       //Add your javascript code here
       if(document.getElementById('flag').value != 'imgReport')
       {
       document.images['imgReport'].src="image/report1.png"
       }
       <?php

       }

       function imgReportJSMouseOver($sender, $params)
       {

       ?>
       //Add your javascript code here
       removeSub();
       if(document.getElementById('flag').value != 'imgReport')
       {
       document.images['imgReport'].src="image/report2.png"
       }
       else
       {
       document.images['imgReport'].src="image/report3.png"
       }
       <?php

       }

       function imgQueueJSClick($sender, $params)
       {

       ?>
       //Add your javascript code here
       document.getElementById('flag').value = 'imgQueue';
       document.images['imgQueue'].src="image/queue3.png"
       clear('imgQueue');
       document.getElementById('JTFrameMain').src = 'queue_list.php';
       <?php

       }

       function imgQueueJSMouseOut($sender, $params)
       {

       ?>
       //Add your javascript code here
       if(document.getElementById('flag').value != 'imgQueue')
       {
       document.images['imgQueue'].src="image/queue1.png"
       }
       <?php

       }

       function imgQueueJSMouseOver($sender, $params)
       {

       ?>
       //Add your javascript code here
       removeSub();
       if(document.getElementById('flag').value != 'imgQueue')
       {
       document.images['imgQueue'].src="image/queue2.png"
       }
       else
       {
       document.images['imgQueue'].src="image/queue3.png"
       }
       <?php

       }

       function imgStatusJSClick($sender, $params)
       {

       ?>
       //Add your javascript code here
       document.getElementById('flag').value = 'imgStatus';
       document.images['imgStatus'].src="image/status3.png"
       clear('imgStatus');
       document.getElementById('JTFrameMain').src = 'main_status.php';
       <?php

       }

       function imgStatusJSMouseOut($sender, $params)
       {

       ?>
       //Add your javascript code here
       if(document.getElementById('flag').value != 'imgStatus')
       {
       document.images['imgStatus'].src="image/status1.png"
       }
       <?php

       }

       function imgStatusJSMouseOver($sender, $params)
       {

       ?>
       //Add your javascript code here
       removeSub();
       if(document.getElementById('flag').value != 'imgStatus')
       {
       document.images['imgStatus'].src="image/status2.png"
       }
       else
       {
       document.images['imgStatus'].src="image/status3.png"
       }
       <?php

       }

       function imgSettingsJSClick($sender, $params)
       {

       ?>
       //Add your javascript code here
       document.images['imgBg'].style.display='block';
       document.images['imgPersonnel'].style.display='block';
       document.images['imgCustomers'].style.display='block';
       document.images['imgVehicles'].style.display='block';
       document.images['imgHaulers'].style.display='block';
       <?php

       }

       function cemexJSLoad($sender, $params)
       {

       ?>
       //Add your javascript code here
       document.images['imgVehicles'].style.display='none';
       document.images['imgHaulers'].style.display='none';
       document.images['imgCustomers'].style.display='none';
       document.images['imgPersonnel'].style.display='none';
       document.images['imgBg'].style.display='none';
       <?php

       }



}

global $application;

global $cemex;

//Creates the form
$cemex=new CEMEX($application);

//Read from resource file
$cemex->loadResource(__FILE__);

//Shows the form
$cemex->show();

?>